Aditya Tiwari Profile picture
👨‍💻 Python | C | C++ | JS (+react) are languages I love & tweet about these regularly. 🤩 73k+ followers on Insta: https://t.co/kZaBcbGH7q
Mar 2, 2023 13 tweets 4 min read
Inheritance in Python

It is a way of creating a new class by deriving it from an existing class.

With inheritance, the new class inherits all properties and behaviors of the existing class, allowing to reuse code and create classes that build on each other

A thread🧵
#Python In Python, we can define a class that inherits from another class using the syntax class DerivedClass(BaseClass):

This means that the DerivedClass is inheriting from the BaseClass.

1/10
Feb 28, 2023 14 tweets 5 min read
Objects and Classes in Python🐍

Objects are instances of a class, and classes are the blueprint for creating objects.

In this thread🧵, we'll explore the concepts of objects and classes in depth, along with some examples.

#Python Image First, let's define a class in Python.

To create a class, we use the class keyword followed by the name of the class. Here's a simple example:

In this example, we've created a class called MyClass with nothing inside it. Let's add some attributes to the class.

1/10 Image
Feb 22, 2023 18 tweets 6 min read
Strings and String Manipulation Methods in Python🐍

Strings in Python are a sequence of characters enclosed in single, double, or triple quotes.

Strings are immutable, which means you cannot change their values after they are created.

Detailed Thread👀🧵

#python #programming Concatenation of Strings : You can concatenate two or more strings using the "+" operator.

1/16
Feb 21, 2023 17 tweets 6 min read
Loops in Python ⚡🐍

Loops are an essential programming concept that allow you to execute a block of code repeatedly. There are two main types of loops in Python: for loops and while loops.

A thread 🧵#python #DataScience For Loop :

A for loop allows you to iterate over a sequence of values, such as a list, tuple, or string.

Here's an example that prints each element of a lists

1/10
Feb 20, 2023 18 tweets 7 min read
F-strings in Python : The ultimate usage tips ⚡

F-strings in Python are a concise and powerful way to format strings. You can include any valid Python expression inside the curly braces in an f-string.

Thread 🧵

#Python #programming Image To use an f-string, just prefix your string with the letter "f".

Here's an example that uses an f-string to format a variable:

#Python
1/16 Image
Jan 27, 2023 11 tweets 10 min read
Internet is full of resources. Its good, but sometimes, people get stuck on which is best for them.

I have compiled a massive list of resources for PYTHON lang you can get started with.

#Python

A thread 🧵 Official SitePython.org
Documentation : docs.python.org/3/
Quick Start Guide : python.org/about/gettings…

#Python

1/9
Jan 7, 2023 8 tweets 2 min read
Optimize your Python code using these 6 ways.

A thread 🧵 1. Use the 'timeit' module to measure the performance of your code.

This will give you a baseline to work from and help you identify areas of your code that are particularly slow.
Dec 23, 2021 7 tweets 8 min read
Twitter is free university.
But 98.8% don’t follow the right people.

Here are top creators you should follow :

1. Web development
2. Python
3. Web3 / Blockchain
4. Machine Learning/Data Science

#infosec 1. Web Development (1/4)

> @parik36
> @Prathkum
> @DenicMarco
> @csaba_kissi
> @Insharamin
> @tapasadhikary
Dec 23, 2021 7 tweets 5 min read
Learning Python ?🐍

Here are my favourite YouTube creators/channels for learning Python.

#MachineLearning #100DaysOfCode
#Python #AI

A thread 🐍📝👇 1. Telusko

Here is complete playlist of Telusko's python includes 67 vids on python and others on Django as well.

youtube.com/playlist?list=…
Nov 16, 2021 8 tweets 4 min read
Python's Math module has many powerful commands that allows you to perform many mathematical tasks easily.

#Python #AI #MachineLearning
#100DaysOfCode #DataScience
Let's have a look at some of them 🧵 ↓ 1. math.sqrt is used to return the square root of a number.

Example 👇
Nov 15, 2021 7 tweets 3 min read
You learn Programming and don't have good problem Solving Skills ?

I got your back;

Here are top 4 Websites to Practice your problem solving skills as a programmer.

#programming #Coding #Python #AI #DataScience #problemsolving

A thread 🦊👇 1. Hackerrank
hackerrank.com