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..
Oprator, what is member dereferencing oprator ?
what is member dereferencing oprator ?
Printer output, Printer output : Consider what is required here. ...
Printer output : Consider what is required here. Do you just require management information on the one hand or camera copy for reprographic purposes? Inkjet Very quiet. C
Random reading and writing and Closing a fcb file, The 21H function and the...
The 21H function and the 22H function of the 21H interruption are the ones in charge of realizing the random readings and writings in that order. The random register number and the
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
Explain different types of attacks, Question 1 Explain synchronous and asy...
Question 1 Explain synchronous and asynchronous Data Replication Question 2 Write a short note on Access Time, Latency, Transfer Time, and Streaming Tape Question 3
CIS247 week6 Lab., Modify the class declaration of the Employee class to sp...
Modify the class declaration of the Employee class to specify that the Employee class is an abstract class Declare an abstract method called CalculateNetPay that returns a double v
What is packet switching? explain, Question 1 What are the five subscriber...
Question 1 What are the five subscriber-related signaling functions performed by the operator? Question 2 Compare Microprogrammed control and Hard-wired control Que
Output devices, Output Devices Video Display Unit (VDU) or Mo...
Output Devices Video Display Unit (VDU) or Monitor Video Display Unit is similar to a television. It is used to display the results of processes. The screen is il
Arinc 429 data bus specifications, ARINC 429 DATA Bus SPECIFICATIONS: A...
ARINC 429 DATA Bus SPECIFICATIONS: ARINC 429 sets specifications for the transfer of digital data between aircraft electronic system components and is a "One-way" communication
CAI, What is CAI? Explain its pitfalls
What is CAI? Explain its pitfalls
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.