Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

cuantas palabras hay en una frase en python

Ver originalcadena = raw_input('Escribe una frase: ')while cadena != '':  cambios = 0  for i in range(1, len(cadena)):    if cadena[i] == ' ' and cadena[i-1] != ' ':      cambios = cambios + 1   if cadena[-1] == ' ':    cambios = cambios - 1   palabras = cambios + 1  print 'Palabras:', palabras   cadena = raw_input('Escribe una frase: ') 
Comment

PREVIOUS NEXT
Code Example
Python :: logout from linux using python 
Python :: Problems with flask bootstrap 
Python :: python you can think pad baldi 
Python :: webdriver antibot 
Python :: python sort array custom comparator 
Python :: df.write using another delimiter 
Python :: instead of: newlist = [] for i in range(1, 100): if i % 2 == 0: newlist.append(i**2) 
Python :: downloading datasets from ml.org repository 
Python :: pandas count zeros in column 
Python :: plt.axes muktiple plots 
Python :: remove inner list from outer list python 
Python :: how to make download link in Jupyter appmode 
Python :: legend outside subplot not displayed 
Python :: how to perform a two-way anova with python 
Python :: how to assign a value to a key dictionary in a list python 
Python :: pandas select rows by condition in list 
Python :: how can space be bent 
Python :: python set prcess name 
Python :: what modules are used for NLG in python 
Python :: advanced use of tuples in python 
Python :: python no mathcing key method found 
Python :: how to go from a url with a zip file to a csv 
Python :: build the .pyx file to c and run on python 
Python :: Custom RGB To Hex Conversion with Python 
Python :: rename multiple value in column in pandas 
Python :: adding multiple items to a list python 
Python :: Python Tkinter PanedWindow Widget Syntax 
Python :: how to track exact location of a phone number in python 
Python :: print hi in python 
Python :: how to clear formatting in python 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =