Untitled
unknown
plain_text
a year ago
480 B
5
Indexable
import random with open('student.txt', 'r') as file: content = file.read() print(content) unselected_list=open('student.txt').readlines() print(unselected_list) print('randomly selected: ') i=1 while unselected_list: input('Press Enter to select the next ID...') selected_id = random.choice(unselected_list) print(f'#{id}. {selected_id}') unselected_list.remove(selected_id) i+=1 print('All IDs have been selected.')
Editor is loading...
Leave a Comment