6/6 problem


#1

what is the problem?

print '$s/$s/$s %s:%s:%s' %(now.month, now.day, now.year
,now.hour, now.minute, now.second)

The code is too long so it has to be over the second line. Does it make a problem? I did not type enter at the end of now.year though.

Please let me know what is the problem.


#2

you have $ instead of %


#3

hi
whats happening people


#4

Well first you have to do the percentage instead of the dollar sign and second i'm getting almost the the same thing but the error is that I miss placed month day year hour minute and second

  • code
    print '%s/%s/%s;%s:%s:%s' % (now.month, now.day, now.year, now.hour, now.minute, now.second)

#5

This code worked for me:
print '%s/%s/%s %s:%s:%s' % (now.month, now.day, now.year, now.hour, now.minute, now.second)

I left a space between the third and fourth % operator.