~doctormo/python-snippets/lp-merge-request-example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env python
#
# [SNIPPET_NAME: String and number concatenation]
# [SNIPPET_CATEGORIES: Python Core]
# [SNIPPET_DESCRIPTION: Concatenate a string and a number]
# [SNIPPET_AUTHOR: Jono Bacon <jono@ubuntu.com>]
# [SNIPPET_LICENSE: GPL]


x = 1

print str(x) + " is a string"
print "%s is a string" % x