Is there any possibility or way to print the string with out passing any arguments or without formatting in python?
To @Blender.
I have done an simple script using mysqlDB module to interact with the mysql server. Using that script i can execute the mysql query to get the output of it.
For an example, if i pass the input as " show master logs " into the script i am getting the error as
TypeError: not enough arguments for format string.
Here i cannot pass the enough agru.net to print the output. Because, if i pass the enough argument to print the output, the i cannot print the output of query which has more argument. So, i want to print the output without any argument.
It is possible or any alternative solution is there, suggest me. I am learner in python
Yes, just print it:
>>> print "hello %s"
hello %s
No formatting occurs, as opposed to:
>>> print "hello %s" % "there"
hello there
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.