Toggle navigation
English
Chinese
Python Sandbox
Please refer to
this tutorial
to find more details on the following codes.
# # Useful functions # # Function - range() print(range(9)) print(range(2,9)) print(range(2,9,2)) print(range(9,2,-2)) # Function - float() x=1 y=float(x) print(x) print(y) # Function - int() x=1.7 y=int(x) print(x) print(y) # Function - str() x=723 y=str(x) print(y[0]) # Function - len() x=range(9,2,-2) print(len(x)) # Function - sort() x=range(9,2,-2) print(x) x.sort() print(x)
Run
List