摘要:
一。条件测试 符号:==, >, >=, <, <=, !=, 逻辑符号:and, or, not 测试有没在列表中 cars = ['audi', 'bmw', 'subaru', 'toyota'] for car in cars: if car != "subaru" and car != " 阅读全文
摘要:
一。遍历整个列表 注意缩进,与不要遗漏冒号。 magicians = ['alice', 'david', 'carolina'] for magician in magicians: #print(magician) print(f"{magician.title()}, that waw a g 阅读全文
摘要:
一。隐藏基类成员与访问基类成员 using System; namespace MaskMember { // 基类 class SomeClass { public string Field1 = "Field1 -- In the base class"; public void Method1 阅读全文
摘要:
一。字符串 1。双引号与单引号灵活应用 str0 = 'I told my friend, "Python is my favorite language!"' str1 = "The language 'Python' is named after Monty Python, not the sn 阅读全文