5,336
edits
No edit summary |
|||
Line 30: | Line 30: | ||
==Regular Expressions (Regex)== | ==Regular Expressions (Regex)== | ||
[https://docs.python.org/3/howto/regex.html Reference]<br> | [https://docs.python.org/3/howto/regex.html Reference]<br> | ||
<syntaxhighlight lang="python"> | |||
import re | |||
myReg = re.compile(r'height:(\d+)cm') | |||
myMatch = re.match(myReg, "height:33cm"); | |||
print(myMatch[1]) | |||
# 33 | |||
</syntaxhighlight> | |||
=Libraries= | =Libraries= | ||
==Numpy== | ==Numpy== |