当前位置:网站首页>Kung Fu pays off, and learning is done
Kung Fu pays off, and learning is done
2022-07-03 12:35:00 【iWillook】
#
# main.py
# Some Python Program
#
# Created by Mewlan Musajan on 4/27/21.
#
print(range(10))
rangeList = list(range(10))
print(rangeList)
for number in range(10):
if number in (3, 4, 7, 9):
print("number is in it")
break
else:
continue
else:
pass
if rangeList[1] == 2:
print("the second item is 2")
elif rangeList[1] == 3:
print("the second item is 3")
else:
print("Donno")
while rangeList[1] == 1:
print("We are trapped in an infinite loop!")
break
funcvar = lambda x: x + 1
print(funcvar(1))
def passingExample(someList, someInt, someString = "A default string"):
someList.append("a new item")
someInt = 4
return someList, someInt, someString
someList = [1, 2, 3]
someInt = 10
print(passingExample(someList, someInt))
class SomeClass(object):
common = 10
someVariable = 0
def __init__(self):
self.someVariable = 3
def someFunction(self, someArgument, anotherArgument):
return self.someVariable
someClass = SomeClass()
someClass.someFunction(1, 2)
anotherClass = SomeClass
print(anotherClass.common)
SomeClass.common = 30
class AnotherClass(SomeClass):
def __init__(self, someArgumentment):
self.someVariable = 3
print(someArgumentment)
def someMethod(self, someInt, someString):
someInt += 1
someString += " world"
if someInt == 1:
someInt = "One day,"
else:
someInt = "%s days passed," % someInt
return "%s I said %s to myself." % (someInt, someString)
someAnotherClass = AnotherClass("hello")
print(someAnotherClass.someVariable)
print(someAnotherClass.someMethod(1, "hello"))
边栏推荐
- Jsup crawls Baidu Encyclopedia
- 2020-10_ Development experience set
- Use of atomicinteger
- If you can't learn, you have to learn. Jetpack compose writes an im app (II)
- Dart: self study system
- Pki/ca and digital certificate
- Record your vulnhub breakthrough record
- elastic_ L02_ install
- 强大的头像制作神器微信小程序
- 2021 autumn Information Security Experiment 1 (password and hiding technology)
猜你喜欢
Sword finger offer03 Repeated numbers in the array [simple]
If you can't learn, you have to learn. Jetpack compose writes an im app (II)
New features of ES6
Self made pop-up input box, input text, and click to complete the event.
Summary of error prone knowledge points: Calculation of define s (x) 3*x*x+1.
Sword finger offer05 Replace spaces
Summary of development issues
Display time with message interval of more than 1 minute in wechat applet discussion area
Develop plug-ins for idea
What is more elegant for flutter to log out and confirm again?
随机推荐
elastic_ L04_ introduction. md
1-1 token
Unicode查询的官方网站
阿里大于发送短信(用户微服务--消息微服务)
(construction notes) ADT and OOP
Airflow installation jump pit
Sword finger offer05 Replace spaces
257. All paths of binary tree
[embedded] - Introduction to four memory areas
Self made pop-up input box, input text, and click to complete the event.
2.9 overview of databinding knowledge points
JVM内存模型
剑指Offer03. 数组中重复的数字【简单】
Introduction to concurrent programming (II)
Slf4j log facade
ImportError: No module named examples. tutorials. mnist
Swagger
Integer string int mutual conversion
adb push apk
error: expected reference but got (raw string)