[Leet Code] Detect Capital

Input: word = "USA"
Output: true
Input: word = "FlaG"
Output: false
class Solution(object):
def detectCapitalUse(self, word):
:type word: str
:rtype: bool
if word.isupper():
return True
elif word.islower():
return True
elif word.istitle():
return True
return False




Learning, and posting my findings!

Love podcasts or audiobooks? Learn on the go with our new app.

Add Programmable Video Communication to Any Application

5 Tips To Debug JavaScript Code Like a Pro Using Console

Riding an ATV

A Chat Progressive Web App

ReactJs PropTypes

The case for declaring (seemingly) pointless variables

const a = b && c;

ITNEXT.io Newsletter August

Building an interactive order form using Getform and Appizy

Array Methods

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Matthew Boyd

Matthew Boyd

Learning, and posting my findings!

More from Medium

LeetCode — Linked List Cycle

Longest Substring Without Repeating Characters📸

What is a Queue?

Linked List — Doubly