Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
2
Task/Character-codes/Python/character-codes-1.py
Normal file
2
Task/Character-codes/Python/character-codes-1.py
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
print ord('a') # prints "97"
|
||||
print chr(97) # prints "a"
|
||||
2
Task/Character-codes/Python/character-codes-2.py
Normal file
2
Task/Character-codes/Python/character-codes-2.py
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
print ord(u'π') # prints "960"
|
||||
print unichr(960) # prints "π"
|
||||
4
Task/Character-codes/Python/character-codes-3.py
Normal file
4
Task/Character-codes/Python/character-codes-3.py
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
print(ord('a')) # prints "97" (will also work in 2.x)
|
||||
print(ord('π')) # prints "960"
|
||||
print(chr(97)) # prints "a" (will also work in 2.x)
|
||||
print(chr(960)) # prints "π"
|
||||
Loading…
Add table
Add a link
Reference in a new issue