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..
Primary or foreign key, QUESTION Your Library is currently offering acc...
QUESTION Your Library is currently offering access to the Internet for its subscribers on a fee paying basis. Subscribers should make a booking for each slot of one hour in adv
Digital electronic, draw the logic diagram of 2*4 decoder in only NOR gate ...
draw the logic diagram of 2*4 decoder in only NOR gate .include enable inputs .
File organization, File Organization There are three types of fi...
File Organization There are three types of file organization used in practice. Let us consider the example of a dictionary. The dictionary contains listing of English wo
What do you mean by the term "robotics", Question 1 What do you mean by se...
Question 1 What do you mean by semantic networks? Explain inheritance in semantic networks Question 2 Explain Partitioned semantic networks with an example Question
Assignment of making a small database, assignment of making a small databas...
assignment of making a small database in C# with a back end support of MS Access. i required a form with following options : Enter a new user (user name, father name, age, d
What is .net framework, Qestion 1 What is .Net Framework? Qestion 2 W...
Qestion 1 What is .Net Framework? Qestion 2 Write short notes on constructors and destructors Qestion 3 Explain boxing and unboxing with examples Qestion 4 What is
Classify computer system according to capacity, classify computer system ac...
classify computer system according to capacity. how they are different from computer according to the classification of technology.provide the comparative study also.
Distinguish between s-http and ssl, QUESTION (a) Distinguish between S...
QUESTION (a) Distinguish between S-HTTP and SSL (b) What are the three basic security provided by SSL? (c) Discuss the limitations of SSL (d) State the port number us
Comments in Python, A hash sign (#) that is not within a string literal beg...
A hash sign (#) that is not within a string literal begins a comment. All characters later than the # and up to the physical line end are division of the comment, and the Python in
Definition of resource sharing , Resource sharing is a concept which has de...
Resource sharing is a concept which has developed to contain many cooperative activities among libraries and other stakeholders. Interlibrary loan continues to be the basis of reso
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
IT Courses and 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.