Notice
Recent Posts
Recent Comments
목록pyformat (1)
준호씨의 블로그
python - Number to String. String-Number concatenation
There is a number. >>> num = 2.3 What if you want to use with string? (String-Number concatenation) You should convert number to string. There are several ways. str function >>> str(num) '2.3' repr function >>> repr(num) '2.3' Backquote >>> `num` '2.3' but, not in python3 >>> `num` File "", line 1 `num` ^ SyntaxError: invalid syntax format >>> "%f" % (num) '2.300000' pyformat >>> '{}'.format(num..
개발이야기
2017. 5. 11. 00:01