I was wondering how I could completely upper case a string without the use of any functions involving .upper()? Is there a way to possibly capitalize with the ord() function? I am in an exercise where I must refrain from using the .upper function.
Upper case a full string without using .upper function? PYTHON
8.7k Views Asked by ComputerGuy22 At
2
There are 2 best solutions below
Related Questions in FUNCTION
- Dynamic array of structures in C++/ cannot fill a dynamic array of doubles in structure from dynamic array of structures
- Function is returning undefined but should be returning a matched object from array in JavaScript
- How do you import functions from one page to another in Jetpack Compose?
- Adding Modules to a Namespace using IIFE
- How to convert mathematical expression to lambda function in C++?
- Custom Bash functions & custom statements - Need some advice
- Why my code is working on everything except one instance?
- Getting a function to call an equation
- Create Symbolic Function from Double Vector MATLAB
- Recursive calls to function passed as a parameter of another method via Consumer interface
- How can I replace a word in SQL but only if it is the last word in the string for a scalar-valued function?
- iterating through raster bands to perform calculation
- How to make this sensor keep taking readings once its when_in_range function has been activated?
- TypeError: indice_delete() takes 0 positional arguments but 3 were given
- How to modify HTML in WordPress core file
Related Questions in CASE
- Best way to create a conditional SQL query? CASE, DECODE, or IF/THEN?
- How to use CASE condition in WHERE in PostgreSQL?
- How to use a conditional to evaluate a paired variable in case statement
- counting items in a nested structure
- SQL How to add a conditional to the aggregate function within a pivot table?
- Combine multiple values into one field using CASE statement
- SQL conditional select and conditional where
- using case_when across multiple columns to calculate difference in time
- How do I Join two SQL tables on Multiple date columns
- Nested MySQL Statement Issue
- Return more than one int value
- Reuse Case statement calculation in select Query
- Django ORM: Case When not working when output is a Subquery producing a list of Ids?
- Type '(any Error)?' has no member 'success'
- PSQL: add case / if statement to `returning` statement
Related Questions in UPPERCASE
- Postgres PSQL on Windows do not connect (authentication failed) for a user with uppercases
- Flutter Make Textfield input become uppercase
- How to convert uppercase/lowercase turkish letters to each other?
- Issue with 'upper-case' module in Node.js: ERR_REQUIRE_ESM when using require()
- Make all the first letters uppercase except for words with at max 3 characters
- Excel VBA advanced filter - uppercase
- Finding uppercase letters
- Need to change text to upper case in JavaScript - createJs
- Why does setting a nullable type to null result in an "Overload resolution ambiguity"?
- Failing to convert upper to lower and vice versa user input string
- X64 Assembly uppercase function
- Kotlin/TeamCity environment variable to uppercase
- problems with case sensitive when migrating php site from windows apache to linux apache
- The name of database and for each table isn't uppercase in the first letter of the word when I using JPA Hibernate
- Python-docx confuses upper and lowercase in extracted text portions
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
So whenever you want to change lowercase character to uppercase without using upper() function, you can just find the ASCII value of lowercase using ord() function, subtract 32 (which is the difference between uppercase and lowercase) and then use chr() function to convert it back to char.