python3学习手册#输入python3 回车 >>> #这里可执行python代码,类似shell脚本 >>> print("hello") >>> exit() #退出交互模式 ②执行一次性代码 # python3 -c "要执行的代码,多个语句之间用;分号隔开" ③执行脚本 ③执行脚本 # vi test.py #内容如下3行 #!/usr/bin/env python3 # coding=u�-8 print("hello world") # chmod +x test.py #添加可执行权限 # python3脚本文件开头位置要指定以下2行(使用的python解释器及本 源码文件编码) #默认直接拼接可遍历的对象,元素只可为 str,中间不会加入其他字符或删除其他字符 stry=",".join(lists) #拼接时在2元素str间添加 ""引号中指定的 符号,这里是添加逗号 strx = "hello" newstrc = strx.center(30, "*") # 输出总字符数30,strx显示为 居中对齐,其余空位使用""引号中指定的*补全 newstrl = strx.ljust(300 码力 | 213 页 | 3.53 MB | 1 年前3
git 操作手册master No commits yet nothing to commit (create/copy files and use "git add" to track) # echo 'print("hello world")' > main.py #随便创建一个文件 # git add . #提交当前工作目录的所有文件到暂存区(add为暂存操0 码力 | 35 页 | 1.69 MB | 1 年前3
共 2 条
- 1













