0
!curlhttps://raw.githubusercontent.com/MicrosoftLearning/intropython/master/elements1_20.txt -o elements1_20.txt
elements = open('elements1_20.txt', 'r')
elements_lines = elements.readlines()

count = 0

for line in elements_lines:
    elements_lines[count] = line[:-1].lower()
    count += 1

print(elements_lines)

['hydrogen', 'helium', 'lithium', 'beryllium', 'boron', 'carbon', 'nitrogen', 'oxygen', 'fluorine', 'neon', 'sodium', 'magnesium', 'aluminum', 'silicon', 'phosphorus', 'sulfur', 'chlorine', 'argon', 'potassium', 'calciu']

As you can see the last element of list is not showing in full? can somebody help me to do so.

Patrick Haugh
  • 59,226
  • 13
  • 88
  • 96
salman
  • 1
  • 2

0 Answers0