Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using POUND SIGN as a string in PYTHON?

Tags:

python

I want to have a string containing 4 pound signs..how can I accomplish this in Python without commenting the string out due to the pound signs?

like image 541
user2315 Avatar asked May 12 '26 00:05

user2315


1 Answers

What about:

x = '####'

If between quotes, it will not be a comment!

like image 104
rodrigo Avatar answered May 14 '26 15:05

rodrigo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!