title: Jupyter notebook to run await function
body: <p>Upon learning <a href="https://docs.python.org/3/library/asyncio-task.html" rel="nofollow noreferrer">Coroutines and Tasks</a> on Jupyter notebook , </p>
  
  <p>Run the following codes</p>
  
  <pre><code>import asyncio
  async def main():
      print('learn')
      await asyncio.sleep(1)
      print('Jupyter')
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/TCv0L.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TCv0L.png" alt="enter image description here"></a></p>
  
  <p>However, it works properly on Ipython   </p>
  
  <p><a href="https://i.stack.imgur.com/Yjltp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Yjltp.png" alt="enter image description here"></a></p>