Python Notes
Python Notes
”)
2. Remove whitespace for string: name = name.strip()
3. Capitalize the user's first name: name = name.capitalize()
4. Capitalize the first letter name: name = name.title()
5. Alternative way of writing +name: ,name
6. Summary alternatively: name = input(“Whats your name?”).strip().title()
7. Split users name into first and then last name: first, last = name.split(“ “)
8. String = str (names)
9. Integer = int (numbers -+)
10. Float = float (decimals)
11. Boolien = bool (True or False)
12. >>> = python in interactive mode
13. Run code = type python, then saved file name.py + enter
14. Create a new file in terminal: Code + file name .py
15. Exit from interactive mode: Exit()
16. When inputting a string function that is calculable type: int(print(“”))
17.