Python

Python Power Operator

The Python power operator lets you do exponential math: It yields the left argument raised to the power of the right argument. Using floats: If any of the numbers in the operation are floats, Python will return a float. You can take a negative number to a positive power, and vice versa: But taking 0 …

Python Power Operator Read More »

Python Max Int

In Python 3 integers don’t have a maximum size. The largest possible list or in-memory sequence is going to be sys.maxsize. Python 2 had a sys.maxint constant with a value of 9223372036854775807, but that constant was removed in Python 3. Also, if you need to use a number that’s larger/smaller than any other you can …

Python Max Int Read More »

Convert Tuple to List

In Python to convert a tuple to a list you just have to use the list() method: Converting tuples of tuples to lists of lists If you have a tuple of tuples you can convert them to lists with list comprehension:

Interactive Python Tutorial

This is an interactive tutorial that teaches the basics of the Python programming language. It’s a complete starter tutorial, at the end of it you should have enough knowledge to start building basic Python applications. Why Learn Python? Python is a great language to learn for the following reasons: It’s an easy language to pick …

Interactive Python Tutorial Read More »

Why You Should Try FastAPI

FastAPI — a relatively new web framework written in the Python programming language for creating a REST (and if you try really hard, then GraphQL) API, based on new features of Python 3.6+, such as: type-hints, native synchronicity (asyncio). Among other things, FastAPI tightly integrates with OpenAPI-schema and automatically generates documentation for your API via …

Why You Should Try FastAPI Read More »