代码拉取完成,页面将自动刷新
#!/usr/bin/env python
# coding: utf-8
# In[ ]:
# %load mymodule.py
#!/usr/bin/env python
# In[2]:
mytuple = ("apple", "banana", "cherry")
myit = iter(mytuple)
print(next(myit))
print(next(myit))
print(next(myit))
# In[3]:
mytuple = ("apple", "banana", "cherry")
for x in mytuple:
print(x)
# In[4]:
mystr = "banana"
for x in mystr:
print(x)
# In[5]:
def myfunc():
x = 100
print(x)
myfunc()
# In[6]:
def myfunc():
x = 100
def myinnerfunc():
print(x)
myinnerfunc()
myfunc()
# In[7]:
x = 100
def myfunc():
x = 200
print(x)
myfunc()
print(x)
# In[10]:
def greeting(name):
print("Hello, " + name)
import mymodule
mymodule.greeting("Bill")
# In[9]:
import mymodule
mymodule.greeting("Bill")
# In[ ]:
def greeting(name):
print("Hello, " + name)
person1 = {
"name": "Bill",
"age": 63,
"country": "USA"
}
# In[2]:
get_ipython().run_line_magic('run', 'mymodule.py')
# In[6]:
# %load mymodule.py
#!/usr/bin/env python
# In[2]:
mytuple = ("apple", "banana", "cherry")
myit = iter(mytuple)
print(next(myit))
print(next(myit))
print(next(myit))
# In[3]:
mytuple = ("apple", "banana", "cherry")
for x in mytuple:
print(x)
# In[4]:
mystr = "banana"
for x in mystr:
print(x)
# In[5]:
def myfunc():
x = 100
print(x)
myfunc()
# In[6]:
def myfunc():
x = 100
def myinnerfunc():
print(x)
myinnerfunc()
myfunc()
# In[7]:
x = 100
def myfunc():
x = 200
print(x)
myfunc()
print(x)
# In[10]:
def greeting(name):
print("Hello, " + name)
import mymodule
mymodule.greeting("Bill")
# In[9]:
import mymodule
mymodule.greeting("Bill")
# In[ ]:
def greeting(name):
print("Hello, " + name)
person1 = {
"name": "Bill",
"age": 63,
"country": "USA"
}
# In[ ]:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。