标签:python--if
#!/usr/bin/env python # -*- coding:utf8 -*- age = int(input("输入您的年龄")) if age < 18: print ("您是一名未成年") elif age > 18: print ("您是一名成年人") else: print ("输入错误,请重新输入") ----------------------------------------------- name_list = ["Jin","Tom","Cat","Jak","Sum"] if "Jin" in name_list: print ("Jin") else: print ("error")
本文出自 “半夏轻浅的博客” 博客,请务必保留此出处http://sublime.blog.51cto.com/8856101/1829637
标签:python--if
原文地址:http://sublime.blog.51cto.com/8856101/1829637