Common built-in functions of python

range()

  • range(30) produces an iterable from 0 to 29,
  • range(3,30) produces an iterable from 3 to 29
  • list(range(30)) produces a list from 0 to 29
  • tuple(range(30) produces a tuple from 0 to 29

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325201947&siteId=291194637