Using POUND SIGN as a string in PYTHON?

前端 未结 3 1530
情深已故
情深已故 2021-01-27 04:16

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?

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-27 04:39

    What about:

    x = '####'
    

    If between quotes, it will not be a comment!

提交回复
热议问题