提交 ce87e4eb 编写于 作者: 澄清寰宇's avatar 澄清寰宇

字符

上级 b6d67640
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
Author: your name
Author: 尹鹏孝
Date: 2021-08-29 16:19:02
LastEditTime: 2021-08-30 22:24:43
LastEditTime: 2021-08-31 20:47:04
LastEditors: Please set LastEditors
Description: In User Settings Edit
Description: python 练习
FilePath: /python/hello.py
'''
# print('hello, world', '尹鹏孝', '美丽')
......@@ -29,3 +30,29 @@ a = b
c = True
a = c
print(a)
PI = 3.14159265359
m = 10//6
print(m)
n = 10 % 4
print(n)
ord('A')
chr(25991)
x = b'ABC'
print(x)
print('中文'.encode('utf-8'))
print(len(b'\xe4\xb8\xad\xff'.decode('utf-8', errors='ignore')))
print(len('中文'.encode('utf-8')))
print('%2d-%02d' % (3, 1))
print('%s❤️%s' % ('尹鹏孝', '徐莹莹'))
print('%d%%,100%%,%d%%' % (90, 200))
print('Hello, {0}, 成绩提升了 {1:.1f}分'.format('尹鹏孝', 100.125))
r = 'wwww'
s = 2.22111
print(f'The area of a circle with radius {r} is {s:.2f}')
list = ['a', 'b', 'c', 'd']
print(list)
pt = len(list)
print(pt)
print(list[2])
print(list[-1])
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册