Welcome to Pyth’s documentation!¶
Pyth is an extremely concise language used for golfing. Try it here at: https://pyth.herokuapp.com. This is a tutorial/documentation/language-specification for it.
Contents:
- 1. Getting Started
- 2. More Details About Pyth
- 3. Some Simple Programs
- 4. Some Simple Programs - Part II
- 5. Learning More - Documentation and Errors
- 6. Adding to Pyth
- 7. The Language Specification - Variables
- 7.1. “G” - The Alphabet
- 7.2. “H” - Empty Dictionary
- 7.3. “J” - Auto-Assignment With Copy
- 7.4. “K” - Auto-Assignment
- 7.5. “N” - Double Quote
- 7.6. “Q” - Evaluated Input
- 7.7. “T” - Ten
- 7.8. “Y” - Empty List
- 7.9. “Z” - Zero
- 7.10. “b” - Line Break
- 7.11. “d” - Space
- 7.12. “k” - Empty String
- 7.13. “z” - Raw Input
- 8. The Language Specification - Control Flow
- 8.1. “#” - Exception Loop
- 8.2. ”)” - Close Parenthesis
- 8.3. ”;” - End Statement
- 8.4. “B” - Break
- 8.5. ”.?” - The Else Statement
- 8.6. “F” - The For Loop
- 8.7. “I” - The If Statement
- 8.8. “V” - Unary-Range-Loop
- 8.9. “W” - While Loop
- 8.10. & - Logical And
- 8.11. “|” - Logical Or
- 8.12. ”?” - Logical If Else
- 9. The Language Specification - Arithmetic
- 10. The Language Specification - Comparisons
- 11. The Language Specification - Sequences
- 11.1. ” - String Literal
- 11.2. “[” - List Constructor
- 11.3. “(” - Tuple Contructor
- 11.4. “{” - Set Constructor
- 11.5. “\” - String Escape
- 11.6. “]” - One Element List
- 11.7. ”,” - Couple Constructor
- 11.8. “a” - Append
- 11.9. “c” - Chop
- 11.10. “e” - End
- 11.11. “h” - Head
- 11.12. “j” - Join
- 11.13. “l” - Length
- 11.14. “r” - Range
- 11.15. “s” - Sum
- 11.16. “t” - Tail
- 11.17. “x” - Index
- 11.18. “y” - Powerset
- 11.19. “S” - Sorted
- 11.20. “U” - Unary Range
- 11.21. “X” - Update Mutable