首页 > TAG信息列表 > tanuki

Linux + Python 的第八天

前言:本次的环境是在lightly这个网站上完成的,可以有一个线上的语言环境,比如python,c+等,可以远程同步。 1、列表切片 a = ["zhangyang","tanuki","dijia","jiamian"] print(a[2:3]) b = ["beauty"] a.extend(b) print(a) b.clear() print(b) 2、切片,排序,反序,循环 #######

Linux + Python 的第九天

1、小练习-1 print("######################################") print("# 张帅帅的颜值你打几分,满分一百分! #") print("######################################") print(" ") kaou = "100" yan = int(kaou) while True: zhi = input("

Linux + Python 第五天

一、格式化打印 # 将信息打印 ------------------info of tanuki------------------ Name : Tanuki email : tanuki_11@163.com hobby : stars and seas -----------------------end------------------------ # 开始 In [1]: info = 'info of tanuki' In [2]: end = 'end�

环境变量使用

[tanuki@localhost python_study]$ cat /etc/profile |tail -3 TMOUT=1800 export PATH=/home/tanuki/python_study:$PATH [tanuki@localhost python_study]$ pwd /home/tanuki/python_study [tanuki@localhost python_study]$ ll total 8 -rwxrw---x 1 tanuki tanuki 325 Ju

一次随笔

本周确实是忙碌的一周,上班干活,下班后写脚本,由于是业务型脚本,所以不能分享,不过其中部分报错,还有使用的语法,还是可以分享的。 一、bc # 在shell中使用bc,需要调用bc参数,不能像终端中输入。 # 小数点后几位可以通过bc来进行定义。 [tanuki@localhost tanuki]$ echo "scale = 4; 10/3"

linux + python的第三天

1、变量赋值 #shell变量赋值及组合变量 [tanuki@localhost ~]$ a=1 [tanuki@localhost ~]$ b=2 [tanuki@localhost ~]$ echo "$a$b" > shell.txt [tanuki@localhost ~]$ cat shell.txt 12 #python变量赋值及组合变量 In [1]: a = 1 In [2]: b = 2 In [3]: a * 10 + b Out[3]: 12