Skip to content

Instantly share code, notes, and snippets.

@ymdx
Created January 26, 2017 21:37
Show Gist options
  • Save ymdx/6d423e474ffbf2d7cba5753621de96ce to your computer and use it in GitHub Desktop.
Save ymdx/6d423e474ffbf2d7cba5753621de96ce to your computer and use it in GitHub Desktop.
Generate limited html tags with python
def draw_row(n):
print "<table>\n"+"\t# call method %d" %n+ " draw_row()"
for i in range(0,n):
print "\t<tr><td></td></tr>"
print "\t#--- End Method" + "\n</table>"
number = input("Enter a number: ")
draw_row(number)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment