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);
}
}
}
file = open('./yourfile.txt')
print(file.readline()) #Read and print first line of yourfile.txt
.readline() is a command to read line of a file.