Jump to content

Python beginner help

Zeorth

So when I try to do quotation marks in python like this '' they seem to end up like this ' ' why is that? How do I fix this?

Link to comment
Share on other sites

Link to post
Share on other sites

"
''

Which one are you typing?

Typing ' twice is not the same as typing " (Shift + ')

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, lewdicrous said:

"
''

Which one are you typing?

Typing ' twice is not the same as typing " (Shift + ')

I'm typing ' twice. If I do (Shift + ') it makes *

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, OreoPandas said:

I'm typing ' twice. If I do (Shift + ') it makes *

You need to find your keyboard shortcut for the real dual quotations symbol- two singles together will never be the same thing. 

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, OreoPandas said:

I'm typing ' twice. If I do (Shift + ') it makes *

Like I said, typing ' twice is not the same as ".

Maybe try shift + 8, seeing as shift + ' prints an *

 

If you're trying to print something with quotation marks, then this might help

#You can use an \ before the second quotation mark so that is prints sentence with them.

print("\"Example\"")

#This is how the example above prints
"Example"

#Or you can use these methods
print("\'Example\'")
print('\"Example\"')

 

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, lewdicrous said:

Like I said, typing ' twice is not the same as ".

Maybe try shift + 8, seeing as shift + ' prints an *

 

If you're trying to print something with quotation marks, then this might help


#You can use an \ before the second quotation mark so that is prints sentence with them.

print("\"Example\"")

#This is how the example above prints
"Example"

#Or you can use these methods
print("\'Example\'")
print('\"Example\"')

 

 

7 minutes ago, Minbari said:

You need to find your keyboard shortcut for the real dual quotations symbol- two singles together will never be the same thing. 

Seems to be Shift + 2 for me. Thanks guys!

Link to comment
Share on other sites

Link to post
Share on other sites

So much confusion about " because he has the British keyboard layout xD

i7 8700K CPU | Gigabyte 1080 TI Turbo Graphics Card | Asus Z370-A Motherboard | 2 x 16GB Vengeance LPX Memory |  Samsung 1TB 970 Pro SSD | WD Red 6TB & WD Green 3TB HDDs | Be Quiet! Dark Base Pro 900 rev.2 Case | EK Monoblock + Bykski Graphics card Waterblocks EK 420 PE + 420 CE Radiators | 6 EK Furious Vardar EVO 140 BB Fans |  Enermax Neochanger 200ml Reservoir & pump

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×