0

How can i put double quotes or single quotes to the input in python? can anyone tell me

While taking input from user, how can i put that input value in single or double quotes

17th Jul 2020, 9:57 AM
Mr. 12
Mr. 12 - avatar
16 Answers
+ 5
Mr. 12 , it would be helpful if you can make a sample how it should look like. Thanks!
17th Jul 2020, 10:21 AM
Lothar
Lothar - avatar
+ 3
There are two options that have not yet been shown here: txt = 'hello world' print(f'"{txt}"') # output: "hello world" # or: print(repr(txt)) # output: 'hello world'
17th Jul 2020, 1:56 PM
Lothar
Lothar - avatar
+ 1
Granger i mean, x = input() we have given hello world it will print hello world, just like we typed. i am asking how can we get "hello world" or 'hello world'. i am asking how can we put single or double quotes for that hello world. it has to print like this
17th Jul 2020, 10:22 AM
Mr. 12
Mr. 12 - avatar
0
Granger bro,it is not working
17th Jul 2020, 10:12 AM
Mr. 12
Mr. 12 - avatar
0
Granger it is also not working bro
17th Jul 2020, 10:30 AM
Mr. 12
Mr. 12 - avatar
0
Input ("tell me your name") Name= blooming Print (input ) hope it helps....and if any error is there please tell so that I can correct it coz I'm a beginner.
18th Jul 2020, 5:29 AM
blooming Flowers
blooming Flowers - avatar
- 1
blooming Flowers that is not what i asked their
18th Jul 2020, 5:44 AM
Mr. 12
Mr. 12 - avatar
- 1
OK so u are asking how can u put double quotes in print ().
18th Jul 2020, 5:47 AM
blooming Flowers
blooming Flowers - avatar
18th Jul 2020, 5:49 AM
Mr. 12
Mr. 12 - avatar
- 1
OK. I'm sorry that I can't able to help.
18th Jul 2020, 5:50 AM
blooming Flowers
blooming Flowers - avatar