In this article, we are going to learn how python can be useful in finding amino acid in a given protein sequence. Before reading this article you must know about FASTA format and single letter code for the amino acid. (Click here FASTA format) Here, we will learn how can we find the total length […]
Category: Python
Python is an interpreted, high-level, general-purpose programming language. Created by Guido van Rossum and first released in 1991…
In this category, we will cover topics like data types, operators, keywords, functions, loops, conditional statements, etc….
Python – Different ways to Reverse a String
In this post, We will see different ways to Reverse a string in Python. Code 1: Using the concept of string-Slicing. Output: Reverse String: nohtimehcoiB Code 2: Using the concept of Looping and string-Concatenation. Output: Reverse String: nohtimehcoiB Code 3: Using the concept of Reverse Looping. Output: Reverse String: nohtimehcoiB Code 4: Using reversed(),list() and […]
Python – Set
Set in Python is an unordered and non-indexed collection of elements that are non-duplicate. It is a Mutable data-type. Creating a Set: a) Using a { }: Set can be created using curly brackets, serparated by comma. Output: {‘d’, ‘b’, ‘c’, ‘e’, ‘a’} b) Using a set() function: Set can be created using set() built-in […]
Python – Dictionary
In Python, Dictionary is an unordered, indexed collection of data values used to store data in the form of keys and values. Keys must be unique whereas values can be repeated. Only immutable data types like string, tuple, int, etc. can be used as keys. Creating a Dictionary: a) Using a { }: Dictionary can […]
How to find out the complementary strand of DNA using Python
What is a complementary strand? DNA (deoxyribonucleic acid) is made up of pentose Sugar, nitrogenous bases, and phosphate. DNA has a backbone of sugar and phosphate. As we all know DNA is a double helical structure (Watson & crick model) and both the strand of DNA are complementary of each other. So, what does it […]
Python – Tuples
This article covers about tuples in python. Tuples can be a collection of homogeneous or heterogeneous items. It can be seen as similar to list but the major difference is that list is mutable unlike tuple which is immutable and list uses square brackets but in tuple we use parentheses. Creating a Tuple: a) Empty […]
Python – frozenset() function
In this article, we will be discussing frozenset() which is an inbuilt function provided by Python language. frozenset() function: The task of this function is to freeze the iterable objects provided and make them unchangeable So that, no changes take place. Also, frozenset() is somehow similar to set(). However, it differs only in making the […]
Python – Number Guessing Game
In this post, we will see how to make a number guessing game in python. So, let’s talk about the game, the user guesses a number in the fixed range then the program tells it is a correct guess or not. If not then the user can guess again. Now, we have to do the […]
Python – Strings
In this article, we’ll be covering about Strings in Python. Strings in Python are a sequence of characters enclosed in single-quotes, double-quotes or sometimes in triple-quotes. Output: <class ‘str’> Accessing characters in String: We can access characters in the string by using an index number in the square brackets. Output: H o Iterating through String: […]
Python – Program to find ASCII value of a character
In this post, we will write a Python program for how to find ASCII value. First, let’s see What is ASCII value? In programming languages, the characters (variable) holds ASCII value which is an integer number rather than that character itself is known as the ASCII value of character. ASCII stands for American Standard Code […]