You are not logged in. Please login at www.codechef.com to post your questions!

×

what is the function of "ord" in python 306 lang.?

tell me the function of the "ord". Also what does this means,"s,t=input(),[0]*26".

asked 18 Feb, 16:22

hassan619's gravatar image

0★hassan619
1
accept rate: 0%


'ord' simply gives you the ascii value of character.

link

answered 18 Feb, 18:28

sshhhh's gravatar image

5★sshhhh
665
accept rate: 10%

as @sshhhh already told its returns you ascii value.

ord(ASCII char) => integer value of that char(0 - 255)

chr(int val) => will return ascii value at that position.

link

answered 18 Feb, 18:35

thesmartguy's gravatar image

3★thesmartguy
786
accept rate: 7%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×22

question asked: 18 Feb, 16:22

question was seen: 68 times

last updated: 18 Feb, 18:35