There is a short cycle with the condition
a = ['admin ', 'andry', 'vika', 'nata'] for name in a: if name == 'admin': print('«Hello admin, would you like to see a status report?»') else: print('Hi' + ' ' + name) Displays:
Hi admin Hi andry Hi vika Hi nata It is worth changing if name == 'admin' to if name == 'vika' starts to work as it should.
Hi admin Hi andry «Hello admin, would you like to see a status report?» Hi nata I can not understand what the problem is.