摘要: import cvxpy as cp import numpy as np import pandas as pd import sympy as sp sp.init_printing(use_unicode=True) import matplotlib.pyplot as plt plt.rc 阅读全文
posted @ 2024-10-27 23:52 世梦 阅读(14) 评论(0) 推荐(0)
摘要: import cvxpy as cp import numpy as np import matplotlib.pyplot as plt plt.rcParams['font.sans-serif']=['Times New Roman + SimSun + WFM Sans SC'] plt.r 阅读全文
posted @ 2024-10-27 23:51 世梦 阅读(16) 评论(0) 推荐(0)
摘要: import numpy as np import pandas as pd import sympy as sp sp.init_printing(use_unicode=True) import matplotlib.pyplot as plt plt.rcParams['font.sans-s 阅读全文
posted @ 2024-10-27 23:50 世梦 阅读(22) 评论(0) 推荐(0)
摘要: import numpy as np import pandas as pd import sympy as sp sp.init_printing(use_unicode=True) import matplotlib.pyplot as plt plt.rcParams['font.sans-s 阅读全文
posted @ 2024-10-27 23:49 世梦 阅读(19) 评论(0) 推荐(0)
摘要: import string import random x = string.ascii_letters + string.digits y=''.join([random.choice(x) for i in range(1000)]) d = dict() for ch in y: d[ch] 阅读全文
posted @ 2024-10-27 23:47 世梦 阅读(26) 评论(0) 推荐(0)
摘要: Dict={'age':18,'score':[98,9],'name':'Zhang','sex':'male'} for item in Dict: print(item) print(" ") for item in Dict.items(): print(item) print(" ") f 阅读全文
posted @ 2024-10-27 23:46 世梦 阅读(15) 评论(0) 推荐(0)
摘要: Dict={'age':18,'score':[98,97],'name':'Zhang','sex':'male'} print(Dict['age']) print(Dict.get('age')) print(Dict.get('address','NotExists.')) print(Di 阅读全文
posted @ 2024-10-27 23:46 世梦 阅读(20) 评论(0) 推荐(0)
摘要: dict1 ={'Alice':'123','Reth':'456','Cecil':'abc'} print(dict1['Alice']) dict1['new']='Hello' dict1['Alice']='1234' dict2={'abc':123,456:78.9} print(di 阅读全文
posted @ 2024-10-27 23:45 世梦 阅读(11) 评论(0) 推荐(0)
摘要: student={'Tom','Jim','Mary','Tom','Jack','Rose'} print(student) a=set('abcdabc') print(a) 阅读全文
posted @ 2024-10-27 23:44 世梦 阅读(15) 评论(0) 推荐(0)
摘要: T=('abc',12,3.45,'Python',2.789) print(T) print(T[-1]) print(T[1:3]) 阅读全文
posted @ 2024-10-27 23:44 世梦 阅读(15) 评论(0) 推荐(0)