当前位置:网站首页>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"))
边栏推荐
- 最新版抽奖盲盒运营版
- (構造筆記)從類、API、框架三個層面學習如何設計可複用軟件實體的具體技術
- New features of ES6
- elastic_ L02_ install
- init. RC service failed to start
- Jsup crawls Baidu Encyclopedia
- Wechat applet pages always report errors when sending values to the background. It turned out to be this pit!
- OpenStack节点地址改变
- 2.6 preliminary cognition of synergetic couroutines
- Dart: about grpc (I)
猜你喜欢

idea将web项目打包成war包并部署到服务器上运行

TOGAF认证自学宝典V2.0

剑指Offer06. 从尾到头打印链表

Idea packages the web project into a war package and deploys it to the server to run

强大的头像制作神器微信小程序

LeetCode 0556.下一个更大元素 III - 4步讲完

Use Tencent cloud IOT platform to connect custom esp8266 IOT devices (realized by Tencent continuous control switch)

Shutter widget: centerslice attribute

Sword finger offer09 Implementing queues with two stacks

Pki/ca and digital certificate
随机推荐
Write a simple nodejs script
Sword finger offer10- I. Fibonacci sequence
Sword finger offer03 Repeated numbers in the array [simple]
Sword finger offer06 Print linked list from end to end
Sword finger offer07 Rebuild binary tree
[ManageEngine] the role of IP address scanning
RedHat5 安装Socket5代理服务器
Oh my Zsh + TMUX installation
Sword finger offer04 Search in two-dimensional array [medium]
1-2 project technology selection and structure
ES6新特性
If you can't learn, you have to learn. Jetpack compose writes an im app (I)
Idea packages the web project into a war package and deploys it to the server to run
The future of cloud computing cloud native
Self made pop-up input box, input text, and click to complete the event.
The difference between lambda and anonymous inner class
Pki/ca and digital certificate
node的ORM使用-Sequelize
Apache Mina Development Manual
CNN MNIST handwriting recognition