Both the attached files cause this problem. I'm using v.2.6.1.

JD

On Tuesday, April 23, 2019 at 4:06:06 PM UTC-7, JDelage wrote:
>
> I'm getting the following error message when trying to import a set of 
> flashcards (as a tab delimited txt file). I'd appreciate any help people 
> might have...
>
>
>
> [image: Screen Shot 2019-04-23 at 4.01.16 PM.png]
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mnemosyne-proj-users+unsubscr...@googlegroups.com.
To post to this group, send email to mnemosyne-proj-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mnemosyne-proj-users/5dc0f6a9-dde9-4e5a-b689-91b8d72d55aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
How to define a function?       <pre>def &lt;function_name&gt;  
(&lt;arg&gt;,...):<br>&#x09;&lt;function body, calms, etc&gt;<br>&#x09;return 
&lt;values, etc&gt
Does a function *need* a return?        No (e.g., print())
What is the alternative to passing argument value by position, e.g., 
<code>cylinder_volume(10, 7)</code>?       By name, e.g., 
<code>cylinder_volume(height=10, radius=7)</code>
What is the alternative to passing argument value by name, e.g., 
<code>cylinder_volume(height=10, radius=7)</code>?     By position, e.g., 
<code>cylinder_volume(10, 7)</code>
How to assign a default value to a function's arguments?        With an "=" 
sign, e.g., <code>def cylinder_volume(height, radius=5):</code>
The value of a global variable can not be modified inside the function unless 
...       ... it is passed in as an argument.
What happens if a piece of code attempts to modify a global variable?   
<code>UnboundLocalError</code>
What's a docstring?     A snipet of text used to describe a function, incl. 
input & output.
A docstring is surrounded by ...        ... triple quotes: """ ... """
Use a lambda expression to replace this: <pre>def multiply(x, 
y):<br>&#x09;return x * y</pre>   <code>multiply = lambda x, y: x * y</code>
<code>filter()</code> is a higher-order built-in function that takes a function 
and iterable as inputs and returns an iterator with the elements from the 
iterable for which the function returns <code>True</code>. The code below uses 
<code>filter()</code> to get the names in cities that are fewer than 10 
characters long to create the list <code>short_cities</code>. Rewrite this code 
to be more concise by replacing the <code>is_short</code> function with a 
lambda expression defined within the call to <code>filter()</code>.<pre>cities 
= ["New York City", "Los Angeles", "Chicago", "Mountain View", "Denver", 
"Boston"]<br>def is_short(name):<br>&#x09;return len(name) < 10<br>short_cities 
= list(filter(is_short, cities))<br>=print(short_cities)</pre>       
<pre>cities = ["New York City", "Los Angeles", "Chicago", "Mountain View", 
"Denver", "Boston"]<br>short_cities = list(filter(lambda name: len(name)<10, 
cities))<br>print(short_cities)</pre>
An ***** is an object that represents a stream of data. iterator
An iterator is an object that represents a *****.       stream of data
***** are a simple way to create iterators using functions.     Generators
Generators are a simple way to create ***** using functions.    iterators
True or false: A list is an iterable.   True
True or false: A list is an iterator.   False
***** are objects that can return one of their elements at a time.      
Iterables
A generator function uses the keyword ***** to return its data. 
<code>yield</code>

Reply via email to