Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

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

readline python

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

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

what is readline() in python

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

PREVIOUS NEXT
Code Example
Python :: python sort array by lambda 
Python :: django rest framework viewset 
Python :: pygame python 
Python :: add key to dictionary python 
Python :: how to find duplicates in pandas 
Python :: getting the number of missing values in pandas 
Python :: draw canvas in python 
Python :: install python 3.7 
Python :: list from dataframe python 
Python :: write str 
Python :: round down number python 
Python :: optional arguments python 
Python :: python3 create list from string 
Python :: print dataframe name python 
Python :: python ascii art 
Python :: Python - How To Convert Bytearray to String 
Python :: characters python 
Python :: create login user django command 
Python :: how to reverse string in python 
Python :: df.rename(index=str, columns={"A": "a", "C": "c"}) what does index=str means 
Python :: python symbol 
Python :: what is a thread in os 
Python :: python xgboost 
Python :: do i need do some set when i use GPU to train tensorflow model 
Python :: Numpy split array into chunks of equal size 
Python :: python array drop item 
Python :: python array spread 
Python :: pathlib change extension 
Python :: three different randomn numbers python 
Python :: string to list of characters python 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =