Customer Service Chat
Get quote & make Payment
Data Type Conversion, Basic Computer Science
Sometimes you may drop to perform conversions among the built-in types. To translate between types you just use the type name as a function.
There are quite a few built-in functions to carry out conversion from one data type to another. These functions return a new object representing the changed value.
Converts x to an integer. Base states the base if x is a string.
long(x [,base] ) Converts x to a long integer. Base identifies the base if x is a string.
float(x) Changes x to a floating-point number.
complex(real [,imag]) Generates a complex number.
str(x) Changes object x to a string representation.
repr(x) Changes object x to an expression string.
eval(str) Estimates a string and returns an object.
tuple(s) Changes s to a tuple.
list(s) Changes to a list.
set(s) Translates s to a set.
dict(d) Generates a dictionary. d must be a sequence of (key, value) tuples.
frozenset(s) Translates s to a frozen set.
chr(x) Translates an integer to a character.
unichr(x) Translates an integer to a Unicode character.
ord(x) Translates a single character to its integer value.
hex(x) Translates an integer to a hexadecimal string.
oct(x) Translates an integer to an octal string.
Posted Date: 5/5/2012 3:59:55 AM | Location : United States
Ask an Expert
Data Type Conversion, Assignment Help, Ask Question on Data Type Conversion, Get Answer, Expert's Help, Data Type Conversion Discussions
Write discussion on Data Type Conversion
Your posts are moderated
Write your message here..
Web Design Project, Hello - What is the turn around time for a 6 page websi...
Hello - What is the turn around time for a 6 page website.
How to create basic assembler program?, The primary step is to start the De...
The primary step is to start the Debug; this step only consists of typing debug [Enter] on the operative system on time. the "a" (assemble) command is used To assemble a program on
Data structure, #question.a tree has 0 off springs at each node. if it had ...
#question.a tree has 0 off springs at each node. if it had a label L, what will be the maximum number of nodes that the tree can have. only an expression involving the number of no
Threading Module of python, The latest threading module comprised with Pyth...
The latest threading module comprised with Python 2.4 provides much more powerful, high-level hold for threads than the old thread module. The threading module depictions all the m
System software, note on high level language and low level language
note on high level language and low level language
Define grid computing, Question 1 Define Grid computing Question 2 ...
Question 1 Define Grid computing Question 2 Explain Attribute-Based Programming Model for Grid Services Question 3 What are the characteristics that users/applicat
Bootstrap loader, Bootstrap loader: The critical programs are loaded i...
Bootstrap loader: The critical programs are loaded into memory by the bootstrap loader at start-up time and will remain resident as long as the computer is running. The bootst
Loading instructions, They are particular register instructions. They are u...
They are particular register instructions. They are used to load bytes or sequences of bytes onto a register. LODS (LODSB) (LODSW) LAHF LDS LEA LES LODS (LODSB) (LODSW) INSTRUCTION
How do you insert a symbol in a word document, Fundamentals of IT 1. Ho...
Fundamentals of IT 1. How do you insert a symbol in a Word document? 2. Explain absolute cell addressing? 3. Discuss Custom List? 4. Explain applications of Multimedia
Unix Shell, Write a shell script, change-lines, which will substitute a str...
Write a shell script, change-lines, which will substitute a string for a replacement string for each occurance of the string in files specified. The original file will be saved,
Accounting Assignment Help
Economics Assignment Help
Finance Assignment Help
Statistics Assignment Help
Physics Assignment Help
Chemistry Assignment Help
Math Assignment Help
Biology Assignment Help
English Assignment Help
Management Assignment Help
Engineering Assignment Help
Programming Assignment Help
Computer Science Assignment Help
Why Us ?
~24x7 hrs Support
~Quality of Work
~Time on Delivery
~Privacy of Work
Human Resource Management
Literature Review Writing Help
Follow Us |
T & C
Copyright by ExpertsMind IT Educational Pvt. Ltd.