随机化列表,然后打印第一个字符-import randomnames = ['Ed Sheeran', 'Beyonce', 'Adele', 'Rhianna']random_names = random.sample(names, len(names))#If you are okay with mutating the original list then look into "shuffle"for name in random_names: print(name[0])输出-ERAB