简体   繁体   English

Python 中这些符号的用途是什么? ♀ ♂

[英]what is the purpose of these symbols in Python? ♀ ♂

print('\f') outputs ♀ (female symbol) and print('\v') outputs ♂ (male symbol). print('\f')输出 ♀(女性符号)和print('\v')输出 ♂(男性符号)。 Since these symbols are not part of the ASCII characters, why does python output them?既然这些符号不是 ASCII 字符的一部分,为什么 python output 呢?

Bonus question: I get why '\f' is the f emale symbol, but why is '\v' the male?额外问题:我明白为什么'\f' f女性符号,但为什么'\v'是男性?

\f stands for Form Feed while \v stands for Vertical Tabulator. \f代表换页,而\v代表垂直制表符。

These are included because they are included with your font.包含这些是因为它们包含在您的字体中。 There is also \t , \r and \n .还有\t\r\n

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM