What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-27 01:50:04
how to reverse word order in python
## initializing the string string = "I am a python programmer" ## splitting the string on space words = string.split() ## reversing the words using reversed() function words = list(reversed(words)) ## joining the words and printing print(" ... Add solution -
TypeScript 2022-01-28 19:21:08
output percentage of vowels and consonants in a given file in python
# Python Program to Count Vowels and Consonants in a String str1 = input("Please Enter Your Own String : ") vowels = 0 consonants = 0 for i in str1: if(i == 'a' or i == 'e' or i == 'i' or i == 'o' or i == 'u' or i == 'A' or i == 'E'... Add solution -
TypeScript 2021-11-19 20:45:17
Write a Python program to create a file containing student records where each record contain rollno and marks in 3 subjects separated by a comma (marks to be considered as list of 3 values).
##Write a Python program to create a file of elements of any data type (mixed data type, i.e. some elements maybe of type int, some elements of type float and some elements of type string). Split this file into three file containing elements of same dat... Add solution -
Python 2021-11-17 11:32:13
python comments
# this is a comment # Python ignores comments, something = 1 # and you can place them after any line of code """If you don't want to write a comments using hashtags, you can put them in a multi-line comment block. However, if you put hash... Add solution