python小练习:以千格式化数值

作者: python测试开发 | 来源:发表于2019-02-02 22:56 被阅读7次

以千格式化数值

>>> number = 1234567890
>>> f"{number:,}"
'1,234,567,890'

Python 3.6以前

>>> number = 1234567890
>>> format(number, ",")
'1,234,567,890'

更多格式化

>>> number = 1234567890
>>> f"{number:020,.2f}"
'0,001,234,567,890.00'

参考资料

Hands-On Software Engineering with Python Pdf

Explore various verticals in software engineering through high-end systems using Python

Key Features

Master the tools and techniques used in software engineering
Evaluates available database options and selects one for the final Central Office system-components
Experience the iterations software go through and craft enterprise-grade systems

Book Description

Software Engineering is about more than just writing code?it includes a host of soft skills that apply to almost any development effort, no matter what the language, development methodology, or scope of the project. Being a senior developer all but requires awareness of how those skills, along with their expected technical counterparts, mesh together through a project's life cycle. This book walks you through that discovery by going over the entire life cycle of a multi-tier system and its related software projects. You'll see what happens before any development takes place, and what impact the decisions and designs made at each step have on the development process. The development of the entire project, over the course of several iterations based on real-world Agile iterations, will be executed, sometimes starting from nothing, in one of the fastest growing languages in the world?Python. Application of practices in Python will be laid out, along with a number of Python-specific capabilities that are often overlooked. Finally, the book will implement a high-performance computing solution, from first principles through complete foundation.

What you will learn

Understand what happens over the course of a system's life (SDLC)
Establish what to expect from the pre-development life cycle steps
Find out how the development-specific phases of the SDLC affect development
Uncover what a real-world development process might be like, in an Agile way
Find out how to do more than just write the code
Identify the existence of project-independent best practices and how to use them
Find out how to design and implement a high-performance computing process

Who this book is for

Hands-On Software Engineering with Python is for you if you are a developer having basic understanding of programming and its paradigms and want to skill up as a senior programmer. It is assumed that you have basic Python knowledge.

相关文章

网友评论

    本文标题:python小练习:以千格式化数值

    本文链接:https://www.haomeiwen.com/subject/rtvesqtx.html