最近开始学习Python ,一些小细节的东西不是很理解,所以就记录一下,方便自己以后查看. 我的Python环境: Mac pro 10.12.3,Python3.5 ,Pycharm 多句题外话:公司的同事都是Windows开发Python,然后在使用Linux进行配置,由于Mac上默认是python2.7.10的版本,要想开发Python还得需要在Mac多装一个版本的Python,当然也可以用Python自带的进行开发.由于我使用Python3.5.0,所以踩了许多坑,重点是设置环境变量的时
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta charset="UTF-8"/> <title>Title</title> <style> .error{ color
#!/usr/bin/env python #coding = utf-8 class Node: def __init__(self,data=None,next = None): self.data = data self.next = next def rev(link): pre = link cur = link.next pre.next = None while cur: temp = cu
#!/usr/bin/env python #coding = utf-8 class Node: def __init__(self,data=None,next = None): self.data = data self.next = next def rev(link): pre = link cur = link.next pre.next = None while cur: temp = cur.next cur.next = pre pre =cur cur = temp retu
1.加载包和数据 numpy is the fundamental package for scientific computing with Python. h5py is a common package to interact with a dataset that is stored on an H5 file. matplotlib is a famous library to plot graphs in Python. PIL and scipy are used here to