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.

Closed due to the fact that the participants are not on topic: Sergey Gornostaev , Vladimir Gamalyan , Regent , Timofei Bondarev , user194374 6 Jan '17 at 17:11 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - Sergey Gornostaev, Vladimir Gamalyan, Regent, Timofei Bondarev, Community Spirit
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • five
    At the end of the first line in the list is an extra space. - Sergey Gornostaev
  • All figured out. Careful to be with spaces inside the quotes - RVG

0