This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wrds = ["end", 'work', "play", "start", "walk", "look", "open", "rain", "learn", "clean"] | |
past_wrds =[] | |
for i in wrds: | |
i +='ed' | |
if i not in past_wrds: | |
past_wrds.append(i) | |
print(past_wrds) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numbers =list(range(41)) | |
print(numbers) | |
sum1=0 | |
for i in numbers: | |
sum1 +=i | |
print(sum1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with open('SP500.txt','r') as fileref: | |
total_sp = 0 | |
count_sp = 0 | |
max_interest = None | |
for idx,line in enumerate(fileref): | |
if idx == 0: | |
continue | |