Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

readline python

file = open('./yourfile.txt')

print(file.readline())	#Read and print first line of yourfile.txt
Comment

Read() and ReadLine()

using System;
 
namespace Sample
{
	class Test
	{
		public static void Main(string[] args)
		{
			int userInput;

			Console.WriteLine("Press any key to continue...");
			Console.ReadKey();
			Console.WriteLine();

			Console.Write("Input using Read() - ");
			userInput = Console.Read();
			Console.WriteLine("Ascii Value = {0}",userInput);
		}
	}
}
Comment

what is readline() in python

.readline() is a command to read line of a file.
Comment

PREVIOUS NEXT
Code Example
Python :: TypeError: expected str, bytes or os.PathLike object, not list 
Python :: selenium 
Python :: __str__python 
Python :: semaphore in python 
Python :: python official documentation 
Python :: store message sent by user in string discord py 
Python :: function to scale features in dataframe 
Python :: prime numbers 1 to 100 
Python :: python group by 
Python :: resampling data python 
Python :: how to find the average in python 
Python :: convert int to hexadecimal 
Python :: shallow copy deep copy python 
Python :: python how to find the highest even in a list 
Python :: math in function 
Python :: sum of diagonal numpy 
Python :: shape function python 
Python :: python tuples 
Python :: python self usage 
Python :: list comprehension in python 
Python :: min max code in python 
Python :: ImportError: cannot import name 
Python :: polynomial regression using scikit-learn library 
Python :: pandas explode 
Python :: data type of none in python 
Python :: how to clear combobox tkinter 
Python :: python daemon 
Python :: first n prime number finder in python 
Python :: python excel sheet 
Python :: how to get the user argent in django 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =