随笔分类 - Python技术相关
摘要:# -*- coding: utf-8 -*- #数字计算 a=1 b=2 print(a+b) print(a*b) print((a+b)/1) #浮点数 print((a+b)//2) ##保留整数部分 print(17%3) #求余数 print(5**2) #幂乘方 #变量使用前必须定义赋值 #字符串 print('abc') print("abc") print("abc"+"def...
阅读全文
摘要:# coding=UTF-8 import os def distcp(): nncheck = os.system('lsof -i:8020') dncheck = os.system('lsof -i:50010') if nncheck == 256 and (dncheck == 256): os.system("su - hdfs hadoop-daem...
阅读全文