./ Write program in Python using Lists and dictionaries, Control statements and Strings and text files

lists and dictionaries

list = ["hello", "there"]
print(list)

Dict = {1: 'hello', 2: 'there'}
print(Dict)
        

continue

for char in 'Python':
    if (char == 'y'):
        continue
    print("Current character: ", char)
        

break

for char in 'Python':
    if (char == 'h'):
        break
    print("Current character: ", char)
        

pass

for char in 'Python':
    if (char == 'h'):
        pass
    print("Current character: ", char)
        

String

sentence = "i Love PYTHON"
print(sentence.capitalize())
print(sentence.lower())
        

text files

f = open("hello.txt", "a")
f.write("Now the file has more content!")
f.close()
f = open("hello.txt", "r")
print(f.read())