๐ŸŒCoding/๐ŸŒŸPython3

[Python] ์†Œ์ˆ˜์  ์ž๋ฆฌ ์ˆ˜ ์ถœ๋ ฅ

๋ฟŒ์•ผ._. 2021. 10. 4. 00:15

๐Ÿ˜‰ ์†Œ์ˆ˜์  n ์ž๋ฆฌ๊นŒ์ง€ ์ถœ๋ ฅ

 

print("{:.nf}".format(10))

 

ex) ์†Œ์ˆ˜์  ๋‘˜์งธ ์ž๋ฆฌ๊นŒ์ง€ ์ถœ๋ ฅ

 

print("{:.2f}".format(10))
#์ถœ๋ ฅ: 10.00

'๐ŸŒCoding > ๐ŸŒŸPython3' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[Python] ์•„์Šคํ‚ค์ฝ”๋“œ  (0) 2021.10.20
[Python] list, tuple -> String  (0) 2021.09.01
[Python] heapq  (0) 2021.08.20
[Python] lambda  (0) 2021.07.29
[Python] ์ˆœ์—ด, ์กฐํ•ฉ  (0) 2021.05.16