Professional Documents
Culture Documents
Crash Course Python by Anuj
Crash Course Python by Anuj
Crash Course Python by Anuj
CRASH Course
Strings
- Changing case in string:
print(name.title())
print(name.upper())
print(name.lower())
2
Concat variables using f, These strings are called f-strings. The f is for format, because Python formats the string by
replacing the name of any variable in braces with its value.
Fname="Anuj"
Lname="Tomar"
fullname=f"{Fname} {Lname}"
print(f"FullName, {fullname.title()}!")
print(f"{lname}!")
print(f"{lname.lstrip()}!")
print(f"{bname}!")
print(f"{bname.strip()}!")
Functions as BlackBoxes
Abstraction - Just use a function without knowing how it is implemented.