Skip to content

Commit

Permalink
student name py changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Mingi Hong committed Jan 24, 2023
1 parent 71b3aa3 commit a76963f
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions Student_Names.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
s = open('studentnames.txt', 'r')
print(s.readline().rstrip('\n'))
print(s.readline().rstrip('\n'))
print(s.readline().rstrip('\n'))
print(s.readline().rstrip('\n'))
print(s.readline().rstrip('\n'))
print(s.readline().rstrip('\n'))
s.close()
# s = open('studentnames.txt', 'r')
# print(s.readline().rstrip('\n'))
# print(s.readline().rstrip('\n'))
# print(s.readline().rstrip('\n'))
# print(s.readline().rstrip('\n'))
# print(s.readline().rstrip('\n'))
# print(s.readline().rstrip('\n'))
# s.close()


studentData = open('studentnames.txt','r')
count = 0
for student in studentData:
name = student.rstrip("\n")
print(name)
count += 1
print(count)
studentData.close()



0 comments on commit a76963f

Please sign in to comment.