Materi For Loop

Run Settings
LanguagePython
Language Version
Run Command
# coffee = ['cappucino','americano','malt coffee'] # for i in coffee: # print(i) # coffee = ['cappucino','americano','malt coffee'] # for i in range(len(coffee)): # for i in range(3) # print(coffee[i]) # a = 'coffee, tea, milk' # b = a.split(', ') # print(b) # for i in range(1,11,3): # print(i) # coffee = ['cappucino','americano','malt coffee','milk coffee','avocado coffee'] # for i in coffee: # if i == 'malt coffee': # print('done') # break # print(i) # coffee = ['cappucino','americano','malt coffee','milk coffee','avocado coffee'] # for i in coffee: # if i == 'malt coffee': # continue # print(i) # coffee = ['cappucino','americano','malt coffee','milk coffee','avocado coffee'] # for i in coffee: # print(i) # else: # print("selesai") # for i in 'coffee': # pass # for _ in range(3): # print('ini berjalan 3x') # bangunan = [ # { # 'bangunan':'persegi', # 'sudut':4, # }, # { # 'bangunan':'persegi panjang', # 'sudut':4, # }, # { # 'bangunan':'lingkaran', # 'sudut':0, # }, # { # 'bangunan':'segitiga', # 'sudut':3, # }, # ] # for i in bangunan: # for _, v in i.items(): # print(f"{v}") # number = [ # [1,2,3], # ['satu','dua','tiga'] # ] # for block in number: # for chunk in block: # print(chunk) # a = ("John", "Charles", "Mike") # b = ("Jenny", "Christy", "Monica","kelebihan") # x = dict(zip(a, b)) # print(x["John"]) # l1 = ["eat", "sleep", "repeat"] # obj1 = enumerate(l1,1) # for k, v in obj1: # print(f"No.{k} {v}")
Editor Settings
Theme
Key bindings
Full width
Lines