Why does this line give error in bash script?
$ python -c "print "{:02d}".format(3)"
File "<string>", line 1
print {:02d}.format(3)
^
SyntaxError: invalid syntax
I am typing this directly in terminal.
While in python console :
>>> print "{:02d}".format(1)
01
print {:02d}.format(3)as the code to run.