Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Python examples - SIMPLE
#python 2.7.12 for i in range(1, 4): print(i) print(range(10, 10)) goStr = "go " * 3 print(goStr) print("goStr length = '" + str(len(goStr)) + "'") print("Type of goStr = '" + str(type(goStr)) + "'") print(type(goStr)) print(type(goStr[0])) print("'" + goStr[0:2] + "'") print(goStr.replace("go go", "Ready, set,")) print(goStr) str1 = "replace last" str2 = str1[8:12] print(str1.replace(str2, "done")) str1 = "replace last." str2 = str1[-5:-1] print(str1.replace(str2, "done"))
run
|
edit
|
history
|
help
0
PySet
binary
Gani
0aa6d60d0504c8470fc90c1d5cbf06083cdaadeab6e102bf90732ac2ab66dfdc
test
irctcbot
gameboy
Filter dictionaries with specific keys (using list comprehension)
Run
Array Example